# Maintainer: Ivan Semkin (ivan at semkin dot ru)

pkgname=libqtdbusmock-git
_pkgname=libqtdbusmock
pkgver=r122.d6d1830
pkgrel=2
pkgdesc='Library for mocking DBus interactions using Qt'
url='https://github.com/ubports/libqtdbusmock'
arch=(x86_64 i686 armv7h aarch64)
license=(LGPL3)
conflicts=(libqtdbusmock)
provides=(libqtdbusmock)
depends=(networkmanager libqtdbustest-git gmock)
makedepends=(git cmake cmake-extras-git) 
checkdepends=(python-dbusmock python-dbus python-gobject)
source=('git+https://github.com/ubports/libqtdbusmock.git')
sha256sums=('SKIP')

pkgver() {
  cd ${_pkgname}
  echo "r$(git rev-list --count HEAD).$(git describe --always)"
}

build() {
  cd ${_pkgname}
  cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_LIBDIR="lib/" .
  make
}

check() {
  cd ${_pkgname}
  make ARGS+="--output-on-failure" test
}

package() {
  cd ${_pkgname}
  make DESTDIR="${pkgdir}/" install
}
# vim:set ts=2 sw=2 et:
